package com.anjie.powerproject.entity;

import javax.persistence.Column;
import javax.persistence.Embeddable;
import java.io.Serializable;
import java.util.Objects;

@Embeddable
public class DeviceValuePK implements Serializable {
    @Column(name = "dev_code")
    private String devCode;

    @Column(name = "sdate")
    private String date;

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        DeviceValuePK that = (DeviceValuePK) o;
        return Objects.equals(devCode, that.devCode) && Objects.equals(date, that.date);
    }

    @Override
    public int hashCode() {
        return Objects.hash(devCode, date);
    }

    public String getDevCode() {
        return devCode;
    }

    public void setDevCode(String devCode) {
        this.devCode = devCode;
    }

    public String getDate() {
        return date;
    }

    public void setDate(String date) {
        this.date = date;
    }
}
